class Solution {
public:
    int returnToBoundaryCount(vector<int>& nums) {
        long long cur = 0;
        int ans = 0;
        for(auto i : nums){
            cur += i;
            if(0 == cur) ans += 1;
        }
        return ans;
    }
};